<template>
	<z-paging ref="paging" v-model="dataList" @query="queryList" bgColor="#f8f8f8" :empty-view-style="{ 'margin-top': '-300rpx' }">
		<template #top>
			<uv-navbar title="门店地址" placeholder autoBack fixed></uv-navbar>
		</template>
		<view class="p-32">
			<block v-for="(item, index) in dataList" :key="index">
				<view class="item p-32 m-b-16">
					<view class="flex-bet-ali">
						<u-icon :name="ASSETSURL + 'logo.png'" size="60rpx" :label="item.name" labelColor="#333" labelSize="28rpx"></u-icon>
						<up-copy :content="item.province + item.city + item.district + item.address">
							<u-image :src="ASSETSURL + 'copy.png'" width="86rpx" height="36rpx" bgColor="transparent"></u-image>
						</up-copy>
					</view>
					<view class="m-t-22">{{ item.province }}{{ item.city }} {{ item.district }} {{ item.address }}</view>
				</view>
			</block>
		</view>
	</z-paging>
</template>

<script setup>
import { onMounted, ref } from 'vue';
import { useCounter } from '@/mixins/userHooks';
import { LoginCenterApi } from '../../api/serves';
const { tool } = useCounter();
const dataList = ref([]);
const paging = ref(null);

//获取列表
const queryList = async () => {
	let { code, data, msg } = await LoginCenterApi.get_store_address();
	if (code != 1) return tool.alert(msg);
	paging.value.complete(data || []);
};
</script>
<style>
page {
	background-color: #f8f8f8 ;
}
</style>
<style lang="scss" scoped>
.item {
	background: #fff;
	border-radius: 12rpx;
}
</style>
